I have created an HTML form that contains an input type text field coded
as:-
onBlur="sendRequest('.$ClientData.",".$Event.',this.value)">
This calls an Ajax script that populates the rest of the HTML form.
This fields event is currently activated, in Firefox, via the TAB but
the user has requested that the activation be altered to Enter.
The problem I have is that Enter is the default action for the form and
I cannot think of a way to achieve what the user requires.
Suggestions please.
--
Regards,
Alf Stockton www.stockton.co.za
Your boyfriend takes chocolate from strangers.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Form and enter key
am 08.05.2007 12:56:41 von Alf C Stockton
Alf Stockton wrote:
> I have created an HTML form that contains an input type text field coded
> as:-
>
> onBlur="sendRequest('.$ClientData.",".$Event.',this.value)">
>
> This calls an Ajax script that populates the rest of the HTML form.
>
> This fields event is currently activated, in Firefox, via the TAB but
> the user has requested that the activation be altered to Enter.
>
> The problem I have is that Enter is the default action for the form and
> I cannot think of a way to achieve what the user requires.
>
> Suggestions please.
>
This means that not only do I want to "Prevent Enter From Submitting
Form" but also cause enter to call Ajax.
In Ajax I can then
if (windows.event.keyCode != 13) return; or similar.
--
Regards,
Alf Stockton www.stockton.co.za
Don't worry so loud, your roommate can't think.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: Form and enter key
am 08.05.2007 13:04:28 von Dale Attree
In your opening form tag
RE: Form and enter key
am 08.05.2007 13:05:00 von Gustav Wiberg
Hi!
Maybe
onEnter=3D"Javascript.,,,,"
Or maybe
onSubmit=3D"Javascript...."
?
Best regards
/Gustav Wiberg
=20
-----Original Message-----
From: Alf Stockton [mailto:alf@stockton.co.za]=20
Sent: Tuesday, May 08, 2007 12:52 PM
To: php windows
Subject: [PHP-WIN] Form and enter key
I have created an HTML form that contains an input type text field coded=20
as:-
onBlur=3D"sendRequest('.$ClientData.",".$Event.',this.value) ">
This calls an Ajax script that populates the rest of the HTML form.
This fields event is currently activated, in Firefox, via the TAB but=20
the user has requested that the activation be altered to Enter.
The problem I have is that Enter is the default action for the form and=20
I cannot think of a way to achieve what the user requires.
Suggestions please.
--=20
Regards,
Alf Stockton www.stockton.co.za
Your boyfriend takes chocolate from strangers.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--=20
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Form and enter key
am 08.05.2007 13:24:26 von Alf C Stockton
Dale Attree wrote:
> In your opening form tag
>
>
onSubmit='return false;'>
which appears to have stopped the form submitting on Enter and I have
added:-
if (window.event.keyCode != 13)
{
window.event.keyCode = 0;
return;
}
to my sendRequest() in my Ajax. This, however, appears to do nothing for me.
> Dale
>
> -----Original Message-----
> From: Alf Stockton [mailto:alf@stockton.co.za]
> Sent: 08 May 2007 12:57 PM
> To: php windows
> Subject: Re: [PHP-WIN] Form and enter key
>
> Alf Stockton wrote:
>> I have created an HTML form that contains an input type text field coded
>> as:-
>>
>> onBlur="sendRequest('.$ClientData.",".$Event.',this.value)">
>>
>> This calls an Ajax script that populates the rest of the HTML form.
>>
>> This fields event is currently activated, in Firefox, via the TAB but
>> the user has requested that the activation be altered to Enter.
>>
>> The problem I have is that Enter is the default action for the form and
>> I cannot think of a way to achieve what the user requires.
>>
>> Suggestions please.
>>
> This means that not only do I want to "Prevent Enter From Submitting
> Form" but also cause enter to call Ajax.
> In Ajax I can then
> if (windows.event.keyCode != 13) return; or similar.
>
>
--
Regards,
Alf Stockton www.stockton.co.za
Q: What's a light-year?
A: One-third less calories than a regular year.
My email disclaimer is available at www.stockton.co.za/disclaimer.html
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Form and enter key
am 09.05.2007 03:44:59 von bedul
sry OOT
----- Original Message -----
From: "Alf Stockton"
To: "php windows"
Sent: Tuesday, May 08, 2007 6:24 PM
Subject: Re: [PHP-WIN] Form and enter key
> Dale Attree wrote:
> > In your opening form tag
> >
> >